import java.awt.*;
import java.util.Random;

public class Food {
	int row,col;
	private static Random r = new Random();

	public Food() {
		this.row = r.nextInt(Yard.ROWS);
		this.col = r.nextInt(Yard.COLS);
	}
	
	public void reAppaer() {
		this.row = r.nextInt(Yard.ROWS);
		this.col = r.nextInt(Yard.COLS);
	}
	
	public void draw(Graphics g) {
		Color c = g.getColor();
		g.setColor(Color.YELLOW);
		g.fillOval(row * Yard.BLOCK_SIZE, col * Yard.BLOCK_SIZE, Yard.BLOCK_SIZE, Yard.BLOCK_SIZE);
		g.setColor(c);
	}
}
